<?php
    $d_id = $_REQUEST["d_id"];
    $value = $_REQUEST["v"];
    $position = $_REQUEST["p"];
    $con=mysqli_connect("localhost","root","","hhuy");
    // Check connection
    if (mysqli_connect_errno())
    {
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
        die();
    }
    
    mysqli_query($con,"UPDATE english_dialogue_answer SET answer='$value' WHERE position='$position'");
    
    mysqli_close($con);
    
?>
